// 修改密码的页面
import Prompt from '@/components/Prompt'
import { checkIsLeave } from '@/components/Prompt/contentChange'
import { ipViewProps } from '../interface'
import UpdateAddressView from '@/components/UpdateAddress'
import { forwardRef } from 'react'
import useAddressHook from '../servers/addressServer'
import { UpdateAddressFormDataProps } from '@/components/UpdateAddress/interface'
const IPView = (props: ipViewProps, ref: any) => {
	// const { ..._useHook } = useAddressHook(props, ref)
	return (
		<>
			<Prompt
				when={false}
				// message={() => {
				// return checkIsLeave({
				// 	/**原数据 */
				// 	oldData: props.formData,
				// 	/**离开时数据 */
				// 	newData: props.newFormData,
				// 	msg: '内容已修改，是否保存？',
				// 	okText: '保存',
				// 	onOk: _useHook.toSave,
				// 	saveBtnIsLeave: false,
				// })
				// }}
			/>
			<UpdateAddressView
				// ref={_useHook.ipRef}
				receiveAddress={props.receiveAddress}
				selectAddress={props.selectAddress}
				// onChange={(formData: UpdateAddressFormDataProps[]) => _useHook.onChange(formData)}
			/>
		</>
	)
}

export default forwardRef(IPView)
